//part1:C04:ex4.10.cpp -- read a integer, if it equal 42, then finished.
#include <iostream>

int main(void)
{
    using namespace std;
    int num;
    cout << "Enter a integer:\n";
    while (cin >> num && num != 42)
    {
        cout << "you input: " << num << endl;
        cout << "Enter a integer:\n";
    }

    return 0;
}

